<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>活动信息</title>
    <link rel="stylesheet" href="/js/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="/js/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/js/Ionicons/css/ionicons.min.css">
    <link rel="stylesheet" href="/js/adminlte/css/AdminLTE.min.css">
    <link rel="stylesheet" href="/js/adminlte/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="/js/adminlte/css/fonts.googleapis.com.css">

    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap/js/bootstrap.js"></script>
    <script src="/js/adminlte/js/adminlte.min.js"></script>
    <script src="/js/plugins/twbsPagination/jquery.twbsPagination.min.js"></script>
    <link href="/css/travelnotes.css" rel="stylesheet" type="text/css">
    <script>
        $(function () {
            // 报名
            $(".btn_apply").click(function () {
                var id = $(this).data('id');
                $.post('/activityRecord/applyActivity.do',{id:id},function (data) {
                    if(data.code == 200){ //用alert或者popup都可以
                        window.location.reload();
                    }else{
                        $.messager.alert("温馨提示", data.msg);
                    }
                })
            })

            // 取消报名
            $(".btn_cancelApply").click(function () {
                var id = $(this).data('id');
                $.post('/activityRecord/cancelApply.do',{id:id},function (data) {
                    if(data.code == 200){ //用alert或者popup都可以
                        window.location.reload();
                    }else{
                        $.messager.alert("温馨提示", data.msg);
                    }
                })
            })
        })
    </script>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <#include "../../common/navbarMember.ftl">
    <!--菜单回显-->
    <#assign currentMenu="activityMember"/>
    <#include "../../common/menuMember.ftl">
    <div class="content-wrapper">
        <section class="content-header">
            <h1>活动详细信息</h1>
        </section>

        <section class="content">
            <div class="box">
                 <div class="main" id="app" style="padding-left: 10px; height: 100%; margin-top: 10px" >
                    <div class="person" data-cs-t="ginfo_person_operate">
                        <a href="JavaScript:;" target="_blank" class="per_pic">
                            <img width="620" height="350" class="detail-img" src="${activity.imgUrl!'/images/default.jpg'}">
                        </a>
                    </div>
                    <div class="view_info" style="line-height: 25px;">
                         <h2>${activity.title!}</h2>

                         <span style="text-align: 16px;">
                            <img class="lazy url img-circle" src="${association.imgUrl!'/images/default.jpg'}" style="height: 30px; width: 30px;"/>
                            主办方：<a href="javascript:;" target="_blank" rel="nofollow" style="color: black">${activity.sponsor!}</a>
                        </span>
                        &nbsp;
                        &nbsp;
                        <span>
                         <#if status! == 2 >
                             <a href="JavaScript:;" class="btn btn-info  btn_end"">
                             <span class="glyphicon glyphicon-leaf"></span> 活动已结束
                             </a>
                         <#elseif status! == 1 >
                         <a href="JavaScript:;" class="btn btn-info  btn_applyEnd"">
                             <span class="glyphicon glyphicon-leaf"></span> 报名截止
                         </a>
                         <#elseif status! == 0>
                        <a href="JavaScript:;" class="btn btn-info  btn_applying"">
                             <span class="glyphicon glyphicon-leaf"></span> 报名中...
                         </a>
                        &nbsp;
                        <a href="JavaScript:;" class="btn btn-warning btn_cancelApply" data-id="${activity.id!}">
                            <span class="glyphicon glyphicon-star-empty"></span>取消
                        </a>
                         <#else>
                        <a href="JavaScript:;" class="btn btn-info  btn_apply" data-id="${activity.id!}">
                            <span class="glyphicon glyphicon-leaf"></span> 报名
                        </a>
                         </#if>
                        </span>
                    </div>
                    <div style="line-height: 25px;">
                        <span class="glyphicon glyphicon-star">简介：</span>
                        <p>${activity.synopsis!}</p>
                    </div>
                    <br>
                    <div >
                        <ul style="list-style-position:inside;">
                            <li>所需人数：${activity.person!}人</li><br>
                            <li>已报名人数：${activity.nowperson!}人</li><br>
                            <li>报名时间：${(activity.applyStartTime?string('yyyy-MM-dd HH:mm:ss'))!} ~ ${(activity.endTime?string('yyyy-MM-dd HH:mm:ss'))!}</li><br>
                            <li>活动时间：${(activity.applyStartTime?string('yyyy-MM-dd HH:mm:ss'))!} ~ ${(activity.applyEndTime?string('yyyy-MM-dd HH:mm:ss'))!}</li><br>
                            <li>活动时长：${activity.allTime!}小时</li><br>
                            <li>地点：${activity.site!}</li>
                        </ul>
                        <br>
                        <ul style="list-style-position:inside;">
                            <li>负责人：${activity.dutyName!}</li><br>
                            <li>负责人联系方式：${activity.mobile!}</li>
                        </ul>
                    </div>
                    <br>
                    <div class="vc_article vc_articleT" style="width: 100%; line-height: 25px;">
                        ${activity.details!}
                    </div>
                     <br>
                     <br>
                    </div>
                </div>
            </div>
    </section>
</div>
    <#include "../../common/footer.ftl">
</div>
</body>
</html>
